# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=swamp
pkgver=59.3c8be65
pkgrel=8
pkgdesc='An OSINT tool for discovering associated sites through Google Analytics Tracking IDs.'
groups=('blackarch' 'blackarch-recon')
arch=('any')
url='https://github.com/jakecreps/swamp'
license=('custom:unknown')
depends=('python' 'python-colorama' 'python-requests')
makedepends=('git')
source=("git+https://github.com/jakecreps/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/python' "$pkgname.py"
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md

  rm README.md

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

